const { contextBridge, ipcRenderer } = require('electron');

contextBridge.exposeInMainWorld('electronAPI', {
  exampleMethod: () => '这是一种示例方法',
  
  // 数据库相关方法
  queryDatabase: (sql, params) => ipcRenderer.invoke('db:query', { sql, params }),
  executeDatabase: (sql, params) => ipcRenderer.invoke('db:execute', { sql, params }),
  getDatabasePath: () => ipcRenderer.invoke('db:path')
});